package com.example.demo.controller;


import com.example.demo.properties.GirlProperties;
import org.apache.catalina.servlet4preview.http.HttpServletRequest;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;

import java.util.HashMap;
import java.util.Map;

/**
 * Created by 廖师兄
 * 2016-10-30 23:36
 */
@Controller
public class HelloController {


    @Autowired
    private GirlProperties girlProperties;

    @RequestMapping("/index")
    public String index(HttpServletRequest request){
        String url = request.getContextPath();
        request.setAttribute("url",url);
        return "/index";
    }
    @RequestMapping("/main")
    public String main(){
        return "/page/main";
    }
}
